var layerId;
$(function(){
	$("#add-button").click(function(){
		layerId=layer.open({
			title: "添加角色",
			area: ['1200px','700px'],
			fix:true,
			type: 2,
			content: basePath+'/role/add.shtml'
		});
	})
})
function editFun(roleId){
	layerId=layer.open({
		title: "修改角色信息",
		area: ['1200px','700px'],
		fix:true,
		type: 2,
		content: basePath+'/role/edit.shtml?roleId='+roleId
	});
}


function deleteFun(roleId){
	if(confirm("确认删除？")){
		 $.ajax({
	  		 url:basePath+"/role/delete.shtml?roleId="+roleId,  
	  		 type:"post",
	  		 dataType:"JSON",
	  		 success:ajaxSuccessRefreshFun
	  	 });
	}
}

